<template>
  <div class="chat-window">
    <div class="top">
      <div class="user-name">Eason</div>
      <icon-svg icon-name="more"></icon-svg>
    </div>
    <ul class="dialogue">
      <li is="leftMsg"></li>
      <li is="tipsMsg"></li>
      <li is="rightMsg"></li>
      <li is="rightMsg"></li>
      <li is="rightMsg"></li>
      <li is="rightMsg"></li>
      <li is="rightMsg"></li>
      <li is="rightMsg"></li>
      <li is="tipsMsg"></li>
      <li is="leftMsg"></li>
      <li is="leftMsg"></li>
      <li is="leftMsg"></li>
    </ul>
    <div class="input-box"></div>
  </div>
</template>

<script lang="ts">
import { Vue, Component, Prop } from 'vue-property-decorator'
import leftMsg from '../Messages/LeftMsg.vue'
import rightMsg from '../Messages/RightMsg.vue'
import tipsMsg from '../Messages/TipsMsg.vue'

@Component({
  components: { leftMsg, rightMsg, tipsMsg }
})
export default class ChatWindow extends Vue {
  @Prop() private dialogueData!: []
}
</script>

<style lang="scss" scoped>
.chat-window {
  width: 100%;
  height: 100%;
  background: pink;
  display: flex;
  flex-direction: column;
  .top {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    font-size: 1.142857rem;
    font-weight: 600;
    user-select: none;
    border-bottom: 0.5px solid $border-color;
    .svg-icon {
      font-size: 1.428571rem;
      cursor: pointer;
    }
  }
  .dialogue {
    flex: 1;
    padding: 20px;
    overflow-Y: scroll;
  }
  .input-box {
    height: 25%;
    min-height: 210px;
    background: #096;
  }
}
</style>
